
from redis import StrictRedis


class Config(object):
    DEBUG = None
    # 设置密钥
    SECRET_KEY = 'fQcPfVNN/AbkwVs1FS2z3p2rirZVzjK55Nc+ke+b3DDaZ1dmORQIcw=='
    SESSION_TYPE = 'redis'
    SESSION_REDIS = StrictRedis(host="127.0.0.1", port=6379)
    SESSION_USE_SIGNER = True
    PERMANENT_SESSION_LIFETIME = 60 * 60 * 24

    # 配置mysql的链接
    SQLALCHEMY_DATABASE_URI = 'mysql://root:mysql@localhost/info_py33'
    # 关闭警告信息
    SQLALCHEMY_TRACK_MODIFICATIONS = False


class Development(Config):
    DEBUG = True

class Production(Config):
    DEBUG = False


# 定义字典，映射类
config_dict = {
    'development':Development,
    'production':Production
}